import request from '@/utils/request'

// 查询用户搜索词记录列表
export function listTerms(query) {
  return request({
    url: '/manage/terms/list',
    method: 'get',
    params: query
  })
}

export function listHotTerms(query) {
  return request({
    url: '/manage/terms/hot',
    method: 'get',
    params: query
  })
}

// 查询用户搜索词记录详细
export function getTerms(searchId) {
  return request({
    url: '/manage/terms/' + searchId,
    method: 'get'
  })
}

// 新增用户搜索词记录
export function addTerms(data) {
  return request({
    url: '/manage/terms',
    method: 'post',
    data: data
  })
}

// 修改用户搜索词记录
export function updateTerms(data) {
  return request({
    url: '/manage/terms',
    method: 'put',
    data: data
  })
}

// 删除用户搜索词记录
export function delTerms(searchId) {
  return request({
    url: '/manage/terms/' + searchId,
    method: 'delete'
  })
}
